new Vue({
    el: '#app',
    mixins: [Save],//组件配置文件，路径/utils/components.js
    data() {
        return {
            dataForm: {},
            childDataForm: [],
            enterprise_info: []//企业
        }
    },
    mounted() {
        /**
         * 组件配置文件中自动执行方法
         * 1.this.init(); //初始化文件
         * 2.this.getData(); //仅修改时执行，根据BOM配置属性查询
         */
        this.getList();
    },
    computed: {
        enterprise() {
            return function (index) {
                const { enterprise_info, childDataForm } = this;
                return enterprise_info.filter(i => i.Enterprise_Info_SerialNumber == childDataForm[index].Enterprise_Info_SerialNumber || !childDataForm.filter(item => item.Row_Status != '1').some(x => i.Enterprise_Info_SerialNumber == x.Enterprise_Info_SerialNumber));
            }
        }
    },
    methods: {
        getList() {
            httpRequest({
                url: '/generalBusiness/generalQueryByTableName',
                data: {
                    Data: 'enterprise_info',
                    Condition: `Row_Status='0'`
                },
                type: "GET",
            }).then(data => {
                this.enterprise_info = data;
            }).catch(xhr => {
                this.$message({
                    message: '系统错误，请联系开发者!',
                    type: 'error'
                })
            })
        },
    }
})